@use "../variables";

.main-footer {
  background-color: variables.$color-pearl;
}

.main-footer__container {
  display: flex;
  padding: 50px 0;

  @media (max-width: variables.$vp-max-tablet) {
    display: grid;
    grid-template-columns: 220px 320px;
    grid-column-gap: 130px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    display: block;
    padding-top: 35px;
    padding-bottom: 0;
  }
}

.main-footer__social-container {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin-right: 160px;

  @media (max-width: variables.$vp-max-desktop) {
    margin-right: 80px;
  }

  @media (max-width: variables.$vp-max-tablet) {
    flex-direction: row;
    justify-content: space-between;
    grid-column: 1 / 3;
    margin-right: 0;
    margin-bottom: 1px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
  }
}

.main-footer__logo {
  display: block;
  margin-bottom: 35px;

  @media (max-width: variables.$vp-max-mobile) {
    margin-bottom: 10px;
  }

  &:hover,
  &:focus-visible {
    opacity: 0.8;
  }

  &:active {
    opacity: 0.6;
  }
}

.main-footer__navigation,
.main-footer__wrapper {
  position: relative;
  padding-top: 7px;

  @media (max-width: variables.$vp-max-tablet) {
    padding-top: 0;
  }
}

.main-footer__navigation h4,
.main-footer__wrapper h4 {
  margin: 0 0 18px;
  padding: 0;
  font-family: variables.$ff-roboto-condensed;
  font-size: 15px;
  line-height: 16px;
  text-transform: uppercase;
  color: variables.$color-default-white;
  letter-spacing: 0.05em;

  @media (max-width: variables.$vp-max-mobile) {
    margin-bottom: 0;
    padding: 22px 0;
  }
}

.main-footer__wrapper {
  margin-left: 30px;

  @media (max-width: variables.$vp-max-tablet) {
    margin-left: 0;
  }

  @media (max-width: variables.$vp-max-mobile) {
    margin-bottom: 35px;

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      width: calc(100% + 50px);
      height: 1px;
      margin: 0 -25px;
      background-color: variables.$color-alice-blue;
      opacity: 0.7;
    }
  }
}

.main-footer__navigation {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 220px 220px;
  grid-column-gap: 30px;

  @media (max-width: variables.$vp-max-desktop) {
    grid-template-columns: 180px 180px;
  }

  @media (max-width: variables.$vp-max-tablet) {
    display: block;
    width: auto;
  }

  @media (max-width: variables.$vp-max-mobile) {
    margin-right: 0;

    &::before {
      content: "";
      position: absolute;
      width: calc(100% + 50px);
      height: 1px;
      margin: 0 -25px;
      background-color: variables.$color-alice-blue;
      opacity: 0.7;
    }

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      width: calc(100% + 50px);
      height: 1px;
      margin: 0 -25px;
      background-color: variables.$color-alice-blue;
      opacity: 0.7;
    }
  }
}

.main-footer__navigation h4 {
  grid-column: 1/3;
}

.main-footer__navigation-links {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  columns: 2 220px;
  column-gap: 30px;

  @media (max-width: variables.$vp-max-mobile) {
    &:last-of-type {
      padding-bottom: 13px;
    }
  }
}

.main-footer__navigation-link {
  display: inline-block;
  padding: 4px 0;
  font-family: variables.$ff-pt-mono;
  font-size: 16px;
  line-height: 21.6px;
  color: variables.$color-default-white;
  opacity: 0.7;

  &:hover,
  &:focus-visible {
    background-color: variables.$color-pearl-veil;
    opacity: 0.8;
  }

  &:active {
    background-color: variables.$color-pearl-veil;
    opacity: 0.6;
  }
}

.main-footer__wrapper h4 {
  margin-bottom: 22px;
}

.main-footer__address {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-style: normal;

  @media (max-width: variables.$vp-max-mobile) {
    padding-bottom: 13px;
  }
}

.main-footer__location {
  display: block;
  margin-bottom: 5px;

  @media (max-width: variables.$vp-max-mobile) {
    margin-bottom: 15px;
  }

  &:hover,
  &:focus-visible {
    background-color: variables.$color-pearl-veil;
  }

  &:active {
    background-color: variables.$color-pearl-veil;
  }
}

.main-footer__phone {
  padding: 5px 0;
}

.main-footer__location,
.main-footer__phone {
  font-family: variables.$ff-pt-mono;
  font-size: 16px;
  line-height: 21px;
  color: variables.$color-default-white;
  opacity: 0.7;

  @media (max-width: variables.$vp-max-mobile) {
    font-size: 14px;
    line-height: 19px;
  }
}

.main-footer__button {
  display: none;

  @media (max-width: variables.$vp-max-mobile) {
    position: absolute;
    top: 9px;
    right: -11px;
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;

    &::after,
    &::before {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 15px;
      height: 1px;
      background-color: variables.$color-alice-blue;
    }

    &::before {
      transform: translate(-50%, -50%) rotate(90deg);
    }
  }
}
